package com.bosssoft.ecds.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Setter;

import java.math.BigInteger;
import java.time.LocalDateTime;

/**
 * @author 张东海
 * @date 2020/8/15
 * @description 单位票据申领具体信息PO类，手写Getter用于保证
 *               传输至前端的对象的属性名与PO所声明的属性名一致
 */
@Setter
@TableName("ube_stock_financeapply_item")
public class UbeStockFinanceapplyItemPO {

    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private BigInteger fId;

    /**
     * 所对应父表（申领信息记录表）主键
     */
    @TableField
    private BigInteger fPid;

    /**
     * 序号
     */
    @TableField
    private Integer fSortNo;

    /**
     * 单位
     */
    @TableField
    private String fUnit;

    /**
     * 数量
     */
    @TableField
    private Integer fNumber;

    /**
     * 票据8位编码
     */
    @TableField
    private String fBillPrecode;

    /**
     * 票据名称
     */
    @TableField
    private String fBillName;

    /**
     * 创建时间
     */
    @TableField
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime fCreateTime;

    /**
     * 更新时间
     */
    @TableField
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime fUpdateTime;

    /**
     * 版本号（乐观锁）
     */
    @Version
    private Integer fVersion;

    public BigInteger getfId() {
        return fId;
    }

    public BigInteger getfPid() {
        return fPid;
    }

    public Integer getfSortNo() {
        return fSortNo;
    }

    public String getfUnit() {
        return fUnit;
    }

    public Integer getfNumber() {
        return fNumber;
    }

    public String getfBillPrecode() {
        return fBillPrecode;
    }

    public String getfBillName() {
        return fBillName;
    }

    public LocalDateTime getfCreateTime() {
        return fCreateTime;
    }

    public LocalDateTime getfUpdateTime() {
        return fUpdateTime;
    }

    public Integer getfVersion() {
        return fVersion;
    }
}
